SlideShare a Scribd company logo
Java Network Programming Tushar B. Kute, Department of Information Technology, Sandip Institute of Technology and Research Centre, Nashik.
Agenda TCP/IP in Java Sockets Datagrams
“ The Network is Computer” Internet Server PC client Local Area Network PDA
Increased demand for Internet applications To take advantage of opportunities presented by the Internet, businesses are continuously seeking new and innovative ways and means for offering their services via the Internet. This created a huge demand for software designers with skills to create new Internet-enabled applications or migrate existing/legacy applications on the Internet platform. Object-oriented Java technologies—Sockets, threads, RMI, clustering, Web services-- have emerged as leading solutions for creating portable, efficient, and maintainable large and complex Internet applications.
Understanding Ports The TCP and UDP protocols use  ports  to map incoming data to a particular  process  running on a computer. server P o r t Client TCP TCP or UDP port port port port app app app app port# data Data Packet
Understanding Ports Port is represented by a positive (16-bit) integer value Some ports have been reserved to support common/well known services: ftp  21/tcp telnet 23/tcp smtp 25/tcp login 513/tcp User level process/services generally use port number value >= 1024
Sockets Sockets provide an interface for programming networks at the transport layer. Network communication using Sockets is very much similar to performing file I/O In fact, socket handle is treated like file handle. The streams used in file I/O operation are also applicable to socket-based I/O Socket-based communication is programming language independent. That means, a socket program written in Java language can also communicate to a program written in Java or non-Java socket program.
Socket Communication A server (program) runs on a specific computer and has a socket that is bound to a specific port. The server waits and listens to the socket for a client to make a connection request. server Client Connection request port
Socket Communication If everything goes well, the server accepts the connection. Upon acceptance, the server gets a new socket bounds to a different port. It needs a new socket (consequently a different port number) so that it can continue to listen to the original socket for connection requests while serving the connected client. server Client Connection port port port
Transmission Control Protocol A connection-based protocol that provides a reliable flow of data between two computers.  Provides a point-to-point channel for applications that require reliable communications.  The Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), and Telnet are all examples of applications that require a reliable communication channel  Guarantees that data sent from one end of the connection actually gets to the other end and in the same order it was sent. Otherwise, an error is reported.
User Datagram Protocol A protocol that sends independent packets of data, called datagrams, from one computer to another with no guarantees about arrival. UDP is not connection-based like TCP and is not reliable: Sender does not wait for acknowledgements  Arrival order is not guaranteed Arrival is not guaranteed Used when speed is essential, even in cost of reliability e.g. streaming media, games, Internet telephony, etc.
Networking Classes in the JDK Through the classes in java.net, Java programs can use TCP or UDP to communicate over the Internet. The  URL, URLConnection, Socket,  and  ServerSocket  classes all use TCP to communicate over the network. The  DatagramPacket, DatagramSocket , and  MulticastSocket  classes are for use with UDP.
TCP/IP in Java Accessing TCP/IP from Java is straightforward. The main functionality is in the following classes: java.net.InetAddress  : Represents an IP address (either IPv4 or IPv6) and has methods for performing DNS lookup (next slide). java.net.Socket  : Represents a TCP socket. java.net.ServerSocket  : Represents a server socket which is capable of waiting for requests from clients.
Sockets and Java Socket Classes A socket is an endpoint of a two-way communication link between two programs running on the network.  A socket is bound to a port number so that the TCP layer can identify the application that data destined to be sent. Java’s .net package provides two classes: Socket  – for implementing a client ServerSocket  – for implementing a server
Java Sockets ServerSocket(1234) Socket(“128.250.25.158”, 1234) Output/write stream Input/read stream It can be host_name like “books.google.com” Client Server
Client Sockets Java wraps OS sockets (over TCP) by the objects of class  java.net.Socket Socket(String  remoteHost , int  remotePort )   Creates a TCP socket and connects it to the remote host on the remote port (hand shake) Write and read using streams: InputStream getInputStream() OutputStream getOutputStream()
Constructors Socket(String  remoteHost , int  remotePort )   Socket(InetAddress ip, int  remotePort )
Instance   Methods InetAddress getInetAddress( ) int getPort( ) int getLocalPort( ) InputStream getInputStream( ) OutputStream getOutputStream( ) void close( )
Implementing a Client 1. Create a Socket Object: client = new Socket( server, port_id ); 2. Create I/O streams for communicating with the server. is = new DataInputStream(client.getInputStream() ); os = new DataOutputStream( client.getOutputStream() ); 3. Perform I/O or communication with the server: Receive data from the server:  String line = is.readLine();  Send data to the server:  os.writeBytes("Hello\n"); 4. Close the socket when done:  client.close();
Example: Whois server class Whois  { public static void main(String args[  ]) throws Exception  { int c; Socket s = new Socket("internic.net", 43); InputStream in = s.getInputStream(); OutputStream out = s.getOutputStream(); String str="www.google.com"; byte buf[] = str.getBytes(); out.write(buf); while ((c = in.read()) != -1)  System.out.print((char) c); s.close(); } }
Example: Time server public class Daytime { public static void main(String[] args) throws Exception { Socket theSocket = new Socket("time.nist.gov", 13); InputStream timeStream = theSocket.getInputStream( ); StringBuffer time = new StringBuffer( ); int c; while ((c = timeStream.read( )) != -1) time.append((char) c); String timeString = time.toString( ).trim( );  System.out.println("It is " + timeString + " at " + "local host"); } }
ServerSocket This class implements server sockets. A server socket waits for requests to come in over the network. It performs some operation based on that request, and then possibly returns a result to the requester.  A server socket is technically not a socket: when a client connects to a server socket, a TCP connection is made, and a (normal) socket is created for each end point.
Constructors ServerSocket (int port)  throws BindException, IOException ServerSocket (int port, int maxQueue)  throws BindException, IOException ServerSocket (int port, int maxQ, InetAddress ip)  throws IOException
Implementing a Server Open the Server Socket: ServerSocket server;  DataOutputStream os; DataInputStream is; server = new ServerSocket( PORT ); Wait for the Client Request: Socket client = server.accept(); Create I/O streams for communicating to the client is = new DataInputStream(client.getInputStream() ); os = new DataOutputStream(client.getOutputStream()); Perform communication with client  Receive from client: String line = is.readLine();  Send to client: os.writeBytes("Hello\n"); Close sockets:  client.close();
Accepting Connections Usually, the  accept()   method is executed within an infinite loop i.e.,  while(true) {...} The accept method returns a new socket (with a new port) for the new channel. It blocks   until connection is made. Syntax: Socket accept() throws IOException
Client-Server Interaction via TCP
Examples EchoDemoServer EchoDemoClient
Datagrams A  datagram  is an independent, self-contained message sent over the network whose arrival, arrival time, and content are not guaranteed.  The  java.net  package contains three classes to help you write Java programs that use datagrams to send and receive packets over the network:  DatagramSocket and DatagramPacket
TCP vs. UDP No. TCP UDP 1 This Connection oriented protocol  This is connection-less protocol 2 The TCP connection is byte stream The UDP connection is a message stream 3 It does not support multicasting and broadcasting It supports broadcasting 4 It provides error control and flow control The error control and flow control is not provided 5 TCP supports full duplex transmission UDP does not support full duplex transmission 6 It is reliable service of data transmission This is an unreliable service of data transmission  7 The TCP packet is called as segment The UDP packet is called as user datagram.
UDP in Java DatagramPacket DatagramSocket
DatagramPacket public DatagramPacket(byte[] buffer, int length)  public DatagramPacket(byte[] buffer, int offset, int length) Example:  byte[] buffer = new byte[8192]; DatagramPacket dp = new  DatagramPacket(buffer, buffer.length);
Sending Datagrams public DatagramPacket(byte[] data, int length, InetAddress destination, int port) public DatagramPacket(byte[] data, int offset, int length,  InetAddress destination, int port)
DatagramSocket public DatagramSocket( ) throws SocketException public DatagramSocket(int port) throws SocketException public DatagramSocket(int port, InetAddress interface) throws SocketException
Sending and Receiving Packets  public void send(DatagramPacket dp) throws IOException public void receive(DatagramPacket dp) throws IOException
Example : UDPServer UDPClient
References 1. Java Network Programming, 3rd Edition, By Elliotte Rusty Harold, O'Reilly, October 2004 Chapter 2: Basic Networking Concepts Chapter 7: URLs and URIs Chapter 9: Sockets for Clients Chapter 10: Sockets for Servers Chapter 13: UDP Datagrams and Sockets Chapter 15: URL Connections 2. Java 2 the Complete Reference , Fifth Edition by Herbert Schildt, 2001, Osborne McGraw Hill. Chapter 18: Networking
Thank You

More Related Content

PPT
Network programming in Java
PDF
Java networking programs - theory
PPTX
Networking in Java
PPT
Networking in java
PPT
Java Network Programming
PPT
Network Programming in Java
PPT
Networking Java Socket Programming
PPT
Sockets
Network programming in Java
Java networking programs - theory
Networking in Java
Networking in java
Java Network Programming
Network Programming in Java
Networking Java Socket Programming
Sockets

What's hot (20)

PPTX
Advance Java-Network Programming
PPT
A Short Java Socket Tutorial
PPTX
Java socket programming
PPSX
Network protocols and Java programming
PPTX
Socket programming in Java (PPTX)
PPT
Socket Programming - nitish nagar
PPT
Java Networking
PDF
Socket programming using java
PPT
Java networking
PPT
Java Socket Programming
PPT
Java API: java.net.InetAddress
PDF
Chap 1 Network Theory & Java Overview
PPT
java networking
PDF
Java Programming - 07 java networking
PPT
Md13 networking
DOCX
Simple chat room using python
PPT
Java Networking
PPTX
Multiplayer Java Game
PPT
Socket Programming Tutorial
PPTX
Network programming in java - PPT
Advance Java-Network Programming
A Short Java Socket Tutorial
Java socket programming
Network protocols and Java programming
Socket programming in Java (PPTX)
Socket Programming - nitish nagar
Java Networking
Socket programming using java
Java networking
Java Socket Programming
Java API: java.net.InetAddress
Chap 1 Network Theory & Java Overview
java networking
Java Programming - 07 java networking
Md13 networking
Simple chat room using python
Java Networking
Multiplayer Java Game
Socket Programming Tutorial
Network programming in java - PPT
Ad

Similar to Network programming in Java (20)

PPT
Unit 8 Java
PPTX
Socket & Server Socket
PDF
28 networking
PPTX
5_6278455688045789623.pptx
PPT
Socket Programming in Java.ppt yeh haii
PPT
Networking.ppt(client/server, socket) uses in program
PPTX
PDF
How a network connection is created A network connection is initi.pdf
PDF
PPT
Sockets.ppt socket sofcv ohghjagshsdjjhjfb
PPTX
Tcp/ip server sockets
PPT
Udp Programming
PPT
Udp Programming
PPTX
PPTX
Java Network Programming.pptx
PDF
Socket Programming by Rajkumar Buyya
PDF
Socket programming
PPTX
#1 (TCPvs. UDP)
PDF
Networking
PPTX
Java socket presentation
Unit 8 Java
Socket & Server Socket
28 networking
5_6278455688045789623.pptx
Socket Programming in Java.ppt yeh haii
Networking.ppt(client/server, socket) uses in program
How a network connection is created A network connection is initi.pdf
Sockets.ppt socket sofcv ohghjagshsdjjhjfb
Tcp/ip server sockets
Udp Programming
Udp Programming
Java Network Programming.pptx
Socket Programming by Rajkumar Buyya
Socket programming
#1 (TCPvs. UDP)
Networking
Java socket presentation
Ad

More from Tushar B Kute (20)

PDF
ॲलन ट्युरिंग: कृत्रिम बुद्धिमत्तेचा अग्रदूत - लेखक: तुषार भ. कुटे.pdf
PDF
Apache Pig: A big data processor
PDF
01 Introduction to Android
PDF
Ubuntu OS and it's Flavours
PDF
Install Drupal in Ubuntu by Tushar B. Kute
PDF
Install Wordpress in Ubuntu Linux by Tushar B. Kute
PDF
Share File easily between computers using sftp
PDF
Signal Handling in Linux
PDF
Implementation of FIFO in Linux
PDF
Implementation of Pipe in Linux
PDF
Basic Multithreading using Posix Threads
PDF
Part 04 Creating a System Call in Linux
PDF
Part 03 File System Implementation in Linux
PDF
Part 02 Linux Kernel Module Programming
PDF
Part 01 Linux Kernel Compilation (Ubuntu)
PDF
Open source applications softwares
PDF
Introduction to Ubuntu Edge Operating System (Ubuntu Touch)
PDF
Unit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B Kute
PDF
Technical blog by Engineering Students of Sandip Foundation, itsitrc
PDF
Chapter 01 Introduction to Java by Tushar B Kute
ॲलन ट्युरिंग: कृत्रिम बुद्धिमत्तेचा अग्रदूत - लेखक: तुषार भ. कुटे.pdf
Apache Pig: A big data processor
01 Introduction to Android
Ubuntu OS and it's Flavours
Install Drupal in Ubuntu by Tushar B. Kute
Install Wordpress in Ubuntu Linux by Tushar B. Kute
Share File easily between computers using sftp
Signal Handling in Linux
Implementation of FIFO in Linux
Implementation of Pipe in Linux
Basic Multithreading using Posix Threads
Part 04 Creating a System Call in Linux
Part 03 File System Implementation in Linux
Part 02 Linux Kernel Module Programming
Part 01 Linux Kernel Compilation (Ubuntu)
Open source applications softwares
Introduction to Ubuntu Edge Operating System (Ubuntu Touch)
Unit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B Kute
Technical blog by Engineering Students of Sandip Foundation, itsitrc
Chapter 01 Introduction to Java by Tushar B Kute

Recently uploaded (20)

PDF
Sunset Boulevard Student Revision Booklet
PPTX
NOI Hackathon - Summer Edition - GreenThumber.pptx
PDF
Mga Unang Hakbang Tungo Sa Tao by Joe Vibar Nero.pdf
PPTX
Revamp in MTO Odoo 18 Inventory - Odoo Slides
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PPTX
How to Manage Bill Control Policy in Odoo 18
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PDF
Module 3: Health Systems Tutorial Slides S2 2025
PPTX
Onica Farming 24rsclub profitable farm business
PPTX
Introduction and Scope of Bichemistry.pptx
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
What Is Coercive Control? Understanding and Recognizing Hidden Abuse
PPTX
Presentation on Janskhiya sthirata kosh.
PPTX
Congenital Hypothyroidism pptx
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
IMMUNIZATION PROGRAMME pptx
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
5.Universal-Franchise-and-Indias-Electoral-System.pdfppt/pdf/8th class social...
PPTX
Software Engineering BSC DS UNIT 1 .pptx
PDF
English Language Teaching from Post-.pdf
Sunset Boulevard Student Revision Booklet
NOI Hackathon - Summer Edition - GreenThumber.pptx
Mga Unang Hakbang Tungo Sa Tao by Joe Vibar Nero.pdf
Revamp in MTO Odoo 18 Inventory - Odoo Slides
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
How to Manage Bill Control Policy in Odoo 18
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Module 3: Health Systems Tutorial Slides S2 2025
Onica Farming 24rsclub profitable farm business
Introduction and Scope of Bichemistry.pptx
Renaissance Architecture: A Journey from Faith to Humanism
What Is Coercive Control? Understanding and Recognizing Hidden Abuse
Presentation on Janskhiya sthirata kosh.
Congenital Hypothyroidism pptx
Week 4 Term 3 Study Techniques revisited.pptx
IMMUNIZATION PROGRAMME pptx
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
5.Universal-Franchise-and-Indias-Electoral-System.pdfppt/pdf/8th class social...
Software Engineering BSC DS UNIT 1 .pptx
English Language Teaching from Post-.pdf

Network programming in Java

  • 1. Java Network Programming Tushar B. Kute, Department of Information Technology, Sandip Institute of Technology and Research Centre, Nashik.
  • 2. Agenda TCP/IP in Java Sockets Datagrams
  • 3. “ The Network is Computer” Internet Server PC client Local Area Network PDA
  • 4. Increased demand for Internet applications To take advantage of opportunities presented by the Internet, businesses are continuously seeking new and innovative ways and means for offering their services via the Internet. This created a huge demand for software designers with skills to create new Internet-enabled applications or migrate existing/legacy applications on the Internet platform. Object-oriented Java technologies—Sockets, threads, RMI, clustering, Web services-- have emerged as leading solutions for creating portable, efficient, and maintainable large and complex Internet applications.
  • 5. Understanding Ports The TCP and UDP protocols use ports to map incoming data to a particular process running on a computer. server P o r t Client TCP TCP or UDP port port port port app app app app port# data Data Packet
  • 6. Understanding Ports Port is represented by a positive (16-bit) integer value Some ports have been reserved to support common/well known services: ftp 21/tcp telnet 23/tcp smtp 25/tcp login 513/tcp User level process/services generally use port number value >= 1024
  • 7. Sockets Sockets provide an interface for programming networks at the transport layer. Network communication using Sockets is very much similar to performing file I/O In fact, socket handle is treated like file handle. The streams used in file I/O operation are also applicable to socket-based I/O Socket-based communication is programming language independent. That means, a socket program written in Java language can also communicate to a program written in Java or non-Java socket program.
  • 8. Socket Communication A server (program) runs on a specific computer and has a socket that is bound to a specific port. The server waits and listens to the socket for a client to make a connection request. server Client Connection request port
  • 9. Socket Communication If everything goes well, the server accepts the connection. Upon acceptance, the server gets a new socket bounds to a different port. It needs a new socket (consequently a different port number) so that it can continue to listen to the original socket for connection requests while serving the connected client. server Client Connection port port port
  • 10. Transmission Control Protocol A connection-based protocol that provides a reliable flow of data between two computers. Provides a point-to-point channel for applications that require reliable communications. The Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), and Telnet are all examples of applications that require a reliable communication channel Guarantees that data sent from one end of the connection actually gets to the other end and in the same order it was sent. Otherwise, an error is reported.
  • 11. User Datagram Protocol A protocol that sends independent packets of data, called datagrams, from one computer to another with no guarantees about arrival. UDP is not connection-based like TCP and is not reliable: Sender does not wait for acknowledgements Arrival order is not guaranteed Arrival is not guaranteed Used when speed is essential, even in cost of reliability e.g. streaming media, games, Internet telephony, etc.
  • 12. Networking Classes in the JDK Through the classes in java.net, Java programs can use TCP or UDP to communicate over the Internet. The URL, URLConnection, Socket, and ServerSocket classes all use TCP to communicate over the network. The DatagramPacket, DatagramSocket , and MulticastSocket classes are for use with UDP.
  • 13. TCP/IP in Java Accessing TCP/IP from Java is straightforward. The main functionality is in the following classes: java.net.InetAddress : Represents an IP address (either IPv4 or IPv6) and has methods for performing DNS lookup (next slide). java.net.Socket : Represents a TCP socket. java.net.ServerSocket : Represents a server socket which is capable of waiting for requests from clients.
  • 14. Sockets and Java Socket Classes A socket is an endpoint of a two-way communication link between two programs running on the network. A socket is bound to a port number so that the TCP layer can identify the application that data destined to be sent. Java’s .net package provides two classes: Socket – for implementing a client ServerSocket – for implementing a server
  • 15. Java Sockets ServerSocket(1234) Socket(“128.250.25.158”, 1234) Output/write stream Input/read stream It can be host_name like “books.google.com” Client Server
  • 16. Client Sockets Java wraps OS sockets (over TCP) by the objects of class java.net.Socket Socket(String remoteHost , int remotePort ) Creates a TCP socket and connects it to the remote host on the remote port (hand shake) Write and read using streams: InputStream getInputStream() OutputStream getOutputStream()
  • 17. Constructors Socket(String remoteHost , int remotePort ) Socket(InetAddress ip, int remotePort )
  • 18. Instance Methods InetAddress getInetAddress( ) int getPort( ) int getLocalPort( ) InputStream getInputStream( ) OutputStream getOutputStream( ) void close( )
  • 19. Implementing a Client 1. Create a Socket Object: client = new Socket( server, port_id ); 2. Create I/O streams for communicating with the server. is = new DataInputStream(client.getInputStream() ); os = new DataOutputStream( client.getOutputStream() ); 3. Perform I/O or communication with the server: Receive data from the server: String line = is.readLine(); Send data to the server: os.writeBytes("Hello\n"); 4. Close the socket when done: client.close();
  • 20. Example: Whois server class Whois { public static void main(String args[ ]) throws Exception { int c; Socket s = new Socket("internic.net", 43); InputStream in = s.getInputStream(); OutputStream out = s.getOutputStream(); String str="www.google.com"; byte buf[] = str.getBytes(); out.write(buf); while ((c = in.read()) != -1) System.out.print((char) c); s.close(); } }
  • 21. Example: Time server public class Daytime { public static void main(String[] args) throws Exception { Socket theSocket = new Socket("time.nist.gov", 13); InputStream timeStream = theSocket.getInputStream( ); StringBuffer time = new StringBuffer( ); int c; while ((c = timeStream.read( )) != -1) time.append((char) c); String timeString = time.toString( ).trim( ); System.out.println("It is " + timeString + " at " + "local host"); } }
  • 22. ServerSocket This class implements server sockets. A server socket waits for requests to come in over the network. It performs some operation based on that request, and then possibly returns a result to the requester. A server socket is technically not a socket: when a client connects to a server socket, a TCP connection is made, and a (normal) socket is created for each end point.
  • 23. Constructors ServerSocket (int port) throws BindException, IOException ServerSocket (int port, int maxQueue) throws BindException, IOException ServerSocket (int port, int maxQ, InetAddress ip) throws IOException
  • 24. Implementing a Server Open the Server Socket: ServerSocket server; DataOutputStream os; DataInputStream is; server = new ServerSocket( PORT ); Wait for the Client Request: Socket client = server.accept(); Create I/O streams for communicating to the client is = new DataInputStream(client.getInputStream() ); os = new DataOutputStream(client.getOutputStream()); Perform communication with client Receive from client: String line = is.readLine(); Send to client: os.writeBytes("Hello\n"); Close sockets: client.close();
  • 25. Accepting Connections Usually, the accept() method is executed within an infinite loop i.e., while(true) {...} The accept method returns a new socket (with a new port) for the new channel. It blocks until connection is made. Syntax: Socket accept() throws IOException
  • 28. Datagrams A datagram is an independent, self-contained message sent over the network whose arrival, arrival time, and content are not guaranteed. The java.net package contains three classes to help you write Java programs that use datagrams to send and receive packets over the network: DatagramSocket and DatagramPacket
  • 29. TCP vs. UDP No. TCP UDP 1 This Connection oriented protocol This is connection-less protocol 2 The TCP connection is byte stream The UDP connection is a message stream 3 It does not support multicasting and broadcasting It supports broadcasting 4 It provides error control and flow control The error control and flow control is not provided 5 TCP supports full duplex transmission UDP does not support full duplex transmission 6 It is reliable service of data transmission This is an unreliable service of data transmission 7 The TCP packet is called as segment The UDP packet is called as user datagram.
  • 30. UDP in Java DatagramPacket DatagramSocket
  • 31. DatagramPacket public DatagramPacket(byte[] buffer, int length) public DatagramPacket(byte[] buffer, int offset, int length) Example: byte[] buffer = new byte[8192]; DatagramPacket dp = new DatagramPacket(buffer, buffer.length);
  • 32. Sending Datagrams public DatagramPacket(byte[] data, int length, InetAddress destination, int port) public DatagramPacket(byte[] data, int offset, int length, InetAddress destination, int port)
  • 33. DatagramSocket public DatagramSocket( ) throws SocketException public DatagramSocket(int port) throws SocketException public DatagramSocket(int port, InetAddress interface) throws SocketException
  • 34. Sending and Receiving Packets public void send(DatagramPacket dp) throws IOException public void receive(DatagramPacket dp) throws IOException
  • 35. Example : UDPServer UDPClient
  • 36. References 1. Java Network Programming, 3rd Edition, By Elliotte Rusty Harold, O'Reilly, October 2004 Chapter 2: Basic Networking Concepts Chapter 7: URLs and URIs Chapter 9: Sockets for Clients Chapter 10: Sockets for Servers Chapter 13: UDP Datagrams and Sockets Chapter 15: URL Connections 2. Java 2 the Complete Reference , Fifth Edition by Herbert Schildt, 2001, Osborne McGraw Hill. Chapter 18: Networking